import request from '/@/utils/request';

// 查询用户的商家抵扣券列表
export function listUserMerCoupon(query?: Object) {
  return request({
    url: '/module/merCoupon/list',
    method: 'get',
    params: query
  })
}

// 查询用户的商家抵扣券详细
export function getUserMerCoupon(id?: number) {
  return request({
    url: '/module/merCoupon/' + id,
    method: 'get'
  })
}

// 新增用户的商家抵扣券
export function addUserMerCoupon(data?: Object) {
  return request({
    url: '/module/merCoupon',
    method: 'post',
    data: data
  })
}

// 修改用户的商家抵扣券
export function updateUserMerCoupon(data?: Object) {
  return request({
    url: '/module/merCoupon',
    method: 'put',
    data: data
  })
}

// 删除用户的商家抵扣券
export function delUserMerCoupon(id?: number) {
  return request({
    url: '/module/merCoupon/' + id,
    method: 'delete'
  })
}

// 导出用户的商家抵扣券
export function exportUserMerCoupon(query?: Object) {
  return request({
    url: '/module/merCoupon/export',
    method: 'get',
    params: query
  })
}
